package com.soft.line.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RoleInfo {

    private Integer id;

    @NotNull(message = "角色名称不能为空")
    @Length(min=2,max=20,message="角色名称不能小于2位,且不能大于20位")
    private String name;

    @NotNull(message = "角色状态不能为空")
    private String state;

    private String modifyPerson;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date modifyTime;

}